package com.qf.qftenantmanager.web.controller;

import com.qf.common.bean.R;
import com.qf.common.model.QfTenant;
import com.qf.qftenantmanager.service.TenantAuthService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/auth")
public class TenantAuthController {

    @Autowired
    private TenantAuthService tenantAuthService;

    @PostMapping("/tenant/login")
    public R login(@RequestBody QfTenant qfTenant){
        System.out.println("------auth");

        R r = tenantAuthService.login(qfTenant);

        return r;
    }
}
